<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Tanya_model extends CI_Model {
		//jika sebelumnya sudah buat constructor, maka tidak perlu kamu coppas
	function __construct()
	{
		parent:: __construct();
		//melakukan load database apabila kelas ini dipanggil
		$this->load->database();
	}
	
		//select * from table1
	function get_stopwords(){
		$this->db->select('*');
		$this->db->from('stopword');
		$this->db->where('id_stopword',1);
		return $this->db->get();
	}
	
	function update($data){
		$this->db->where('id_stopword',1)->update ('stopword',$data);

	}

        function insert_unique_data_kasus($data){
             $this->db->insert('data_kasus',$data);
        }

        function get_kasus(){
             $this->db->select('*');
             $this->db->from('data_kasus');
             return $this->db->get();
        }

        function get_jawaban_kasus($id){
             $this->db->select('*');
             $this->db->from('data_kasus');
             $this->db->where('id_data_kasus',$id);
             return $this->db->get()->row();

        }
	
}
